#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QGLWidget>
#include <QTimer>
#include "Timer.hpp"
/**
  \short The main window.
  Handles all input, displays all output.  This is where the application begins and ends.
 */
class Director;
class LogDisplay;

class MainWindow : public QGLWidget
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();

public slots:
    void initializeGL();
    void resizeGL(int w,int h);
    void paintGL();
    void runMe();
    void closeEvent(QCloseEvent *evt);

protected slots:
    void keyPressEvent(QKeyEvent *event);

private:
    bool terminate;
    bool init;
    LogDisplay *log;
    Director *director;
    QTimer t;
    Timer blocker;
};

#endif // MAINWINDOW_H
